package com.mvp.mvpdemo.app

import android.app.Application
import android.content.Context
import androidx.multidex.MultiDex
import com.umeng.commonsdk.UMConfigure


/**
 * author    : mahongyin
 * e-mail    : mhy.work@foxmail.com
 * date      : 2020-10-23 16:43
 * introduce :
 */
class App : Application() {
    companion object{
       private lateinit var app: App
        fun getInstance(): App {return app}
    }

    override fun attachBaseContext(base: Context?) {
        super.attachBaseContext(base)
        MultiDex.install(base);
    }

    override fun onCreate() {
        super.onCreate()
        app = this
        UMConfigure.init(
            applicationContext,
            "xxxxxxxxxxxxxxxxxxxxxxxx",
            null,
            UMConfigure.DEVICE_TYPE_PHONE,
            ""
        )
        UMConfigure.setLogEnabled(true)
    }
}